<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="style.css">
    <title>呼吸灯按钮</title>
    <style>
        .app {
            width: 100%;
            height: 100vh;
            background-color: #ffffff;
            position: relative;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .btn31 {
            width: 190px;
            height: 42px;
            cursor: pointer;
            border: none;
            border-radius: 4px;
            background-color: #333;
            font-size: 16px;
            font-weight: 700;
            color: #fff;
            transition: 0.3s;
        }

        .btn31:hover {
            background-color: #3185fa;
        }

        .btn31:active {
            animation: btn31-eff 3s linear infinite;
        }

        @keyframes btn31-eff {
            0% {
                box-shadow: 0 0 2px #3185fa;
            }

            50% {
                box-shadow: 0 0 40px #3185fa;
            }

            100% {
                box-shadow: 0 0 2px #3185fa;
            }
        }
    </style>
</head>

<body>
    <div class="app">
        <button class="btn31">按住说话</button>
    </div>
</body>

</html>